package com.zdar.entities;

/**
 * Contains the basic information of the different unit types.
 * Each unit object will be written based on Unit XML data.
 * This class just serves as a base template for different unit types.
 * The active units will have seperate objects
 * @author danbye50
 *
 */

public class UnitTemplate {
	private String type;
	private String description;
	private String displayName;
	private boolean wildcard;
	
	public UnitTemplate(){
		
	}
	
	
	public String toString(){
		StringBuffer sb = new StringBuffer();
		sb.append("Unit: ");
		sb.append(displayName + ". ");
		sb.append(description);
		
		return sb.toString();
	}
	
	
	//Getters and Setters-----------------------------------------------------------------------
	public String getType(){
		return type;
	}
	public void setType(String type){
		this.type = type;
	}	
	public String getDescription() {
		return description;
	}
	public String getDisplayName() {
		return displayName;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}
	public boolean isWildcard() {
		return wildcard;
	}
	public void setWildcard(boolean wildcard) {
		this.wildcard = wildcard;
	}
	public void setWildcard(String bool){
		if (bool.equalsIgnoreCase("1")){
			setWildcard(true);
		} else {
			setWildcard(false);
		}
	}
}
